package net.zjitc;

public class HelloSpring {
    private String userName;
    private int age;
    private Dog dog;

    public String getUserName() {
        return userName;
    }

    public Dog getDog() {
        return dog;
    }

    public void setDog(Dog dog) {
        this.dog = dog;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }
    public void show(){
        System.out.println("名字 : "+ userName +"\n 年龄"+age);
    }
    public void showDog(){
        System.out.println("dog名字 : "+ dog.getName() +"\n");
    }

    public HelloSpring() {
    }

    public HelloSpring(int age) {
        this.age = age;
    }
}
